clear all
set more off
set maxvar 32767
set matsize 11000
global save save

if "`c(username)'"=="marco"  {
global dropbox "/Users/${username}/Dropbox"
global master_file_path "${dropbox}/Engel_GFT/replication_files"
global stataloc "C:\Program Files\Stata17\StataMP-64.exe"
global intermediate "$master_file_path/data/intermediate_data/R55"
global input "$master_file_path/data/source_data/R55"
cd "$input"
}

else if "`c(username)'"=="YOUR NAME"  {
global dropbox "C:/Users/SET USERNAME HERE/Dropbox"
}


**************************************************************
** 1-
** Assemble blocks 1 and 2. With household level list and district codes dataset (rural plus urban)
**************************************************************

if 1==1{

local start=1
foreach i in U R {
forvalues x = 1(1)4 {

        if `start'==1  {
        use "$input/block_1_2_U1.dta",clear
        }


        if `start'!=1  {
        append using     "$input/block_1_2_`i'`x'.dta"
        }
    display "sector=`i', x=`x'"
    local start=`start'+1
    }
}
$save "$intermediate/hh_list_55.dta", replace


}



**************************************************************
** 2-
** Assemble block 3.(rural plus urban) - religion, soc group, mpce, hhsize
**************************************************************
if 1==1{

local start=1
foreach i in U R {
forvalues x = 1(1)4 {

        if `start'==1  {
        use "$input/block3_hh_U1.dta",clear
        }


        if `start'!=1  {
        append using     "block3_hh_`i'`x'.dta"
        }
    display "Sector=`i', x=`x'"
    local start=`start'+1
    }
}

*Household id:

gen double hhid=10000*FSU_srl_no  +  1000*Segment + 100* secnd_stage_strm + Sample_hhd

duplicates list hhid

sort hhid Per_capitaexpenditure

*8 observations deleted:
duplicates drop hhid,force

$save "$intermediate/hh_main_55.dta", replace


keep hhid Per_capitaexpenditure Household_size Religion Social_group
$save "$intermediate/hh_main_55_skinny.dta", replace

}



**************************************************************
** 3-
** Assemble block 4 -  individual level dataset (rural plus urban)
**************************************************************
if 1==1{

local start=1
foreach i in U R {
forvalues x = 1(1)4 {

        if `start'==1  {
        use "$input/block4_ind_U1.dta",clear
        }


        if `start'!=1  {
        append using     "$input/block4_ind_`i'`x'.dta"
        }
    display "Sector=`i', x=`x'"
    local start=`start'+1
    }
}

$save "$intermediate/ind_55.dta", replace

gen double hhid=10000*FSU_srl_no  +  1000*Segment + 100* secnd_stage_strm + Sample_hhd
gen double ind_id=1000000*FSU_srl_no  +  100000*Segment + 10000* secnd_stage_strm + 100*Sample_hhd + Srl_no_of_members

gen kid=0
replace kid=1 if Age<=16
egen kids=total(kid), by(hhid)
drop kid

gen HH_education_=Educational_std_general if Srl_no_of_members==1
egen HH_education=max(HH_education_), by(hhid)
keep if Srl_no_of_members==1
keep hhid kids HH_education Age
$save "$intermediate/ind_55_skinny.dta", replace

}


**************************************************************
** 4-
** Assemble consumption blocks -  (rural plus urban)

**************************************************************
if 1==1{

foreach dataset in "block5_cons_100_339" "block5_1_cons_340_359" "block6_7_cons_360_399" "block8_1_cons_400_419" "block8_2_cons_420_549" "block9_cons_550_659" {
local start=1
foreach i in U R {
    forvalues x = 1(1)4 {

        if `start'==1  {
        use "$input/`dataset'U1.dta",clear
        }


        if `start'!=1  {
        append using     "$input/`dataset'`i'`x'.dta"
        display "`dataset' Sector=`i', x=`x'"
        }

    local start=`start'+1
    }

    if "`i'"=="U" {
    gen sector=2
    }
}

replace sector=1 if sector!=2

tempfile `dataset'
$save "$intermediate/`dataset'",replace

}
}




**************************************************************
** 5-
** Make consumption blocks into monthly expenditures (some are 365)
**************************************************************

use "$intermediate/block5_cons_100_339.dta", clear
gen state55=floor(State_region/10)
gen region55=State_region-10*floor(State_region/10)
order state55 region55, before(State_region)
drop State_region
rename Quantity_thirty_days quantity
gen Flag_quantity_data=1
label var Flag_quantity_data "1 if recorded, 0 if not"
label var quantity "quantity (30 days)"
rename Value_thirty_days expenditure
label var expenditure "expenditure (30 days)"
keep Record_number-Srl_no_of_item quantity expenditure Flag_quantity_data sector
drop Filler1 Filler Level
tempfile cons_1
save `cons_1'

use "$intermediate/block5_1_cons_340_359.dta", clear
gen state55=floor(State_region/10)
gen region55=State_region-10*floor(State_region/10)
order state55 region55, before(State_region)
drop State_region
rename Quantity_thirty_days quantity
gen Flag_quantity_data=1
label var Flag_quantity_data "1 if recorded, 0 if not"
label var quantity "quantity (30 days)"
rename Value_thirty_days expenditure
label var expenditure "expenditure (30 days)"
keep Record_number-Srl_no_of_item quantity expenditure Flag_quantity_data  sector
drop Filler1 Filler Level
tempfile cons_2
save `cons_2'


*These are annual, so we adjust them to monthly
use "$intermediate/block6_7_cons_360_399.dta", clear
gen state55=floor(State_region/10)
gen region55=State_region-10*floor(State_region/10)
order state55 region55, before(State_region)
drop State_region
gen Flag_quantity_data=1
label var Flag_quantity_data "1 if recorded, 0 if not"
gen quantity=Quantity_365_days*(30/365)
label var quantity "quantity (30 days)"
gen expenditure=Value_365_days*(30/365)
label var expenditure "expenditure (30 days)"
keep Record_number-Srl_no_of_item quantity expenditure Flag_quantity_data  sector
drop Filler1 Filler Level
tempfile cons_3
save `cons_3'

*These are annual, so we adjust them to monthly
use "$intermediate/block8_1_cons_400_419.dta", clear
gen state55=floor(State_region/10)
gen region55=State_region-10*floor(State_region/10)
order state55 region55, before(State_region)
drop State_region
gen quantity=.
gen Flag_quantity_data=0
label var Flag_quantity_data "1 if recorded, 0 if not"
gen expenditure=Value_365_days*(30/365)
label var expenditure "expenditure (30 days)"
keep Record_number-Srl_no_of_item quantity expenditure Flag_quantity_data  sector
drop Filler1 Filler Level
tempfile cons_4
save `cons_4'


use "$intermediate/block8_2_cons_420_549.dta", clear
gen state55=floor(State_region/10)
gen region55=State_region-10*floor(State_region/10)
order state55 region55, before(State_region)
drop State_region
gen quantity=.
label var quantity "quantity (30 days)"
gen Flag_quantity_data=0
label var Flag_quantity_data "1 if recorded, 0 if not"
rename Value_thirty_days expenditure
label var expenditure "expenditure (30 days)"
keep Record_number-Srl_no_of_item quantity expenditure Flag_quantity_data  sector
drop Filler1 Filler Level
tempfile cons_5
save `cons_5'


*These are annual, so we adjust them to monthly
use "$intermediate/block9_cons_550_659.dta", clear
gen state55=floor(State_region/10)
gen region55=State_region-10*floor(State_region/10)
order state55 region55, before(State_region)
drop State_region
gen Flag_quantity_data=0
label var Flag_quantity_data "1 if recorded, 0 if not"
gen quantity=.
label var quantity "quantity (30 days)"
gen expenditure=Value_365_days*(30/365)
label var expenditure "expenditure (30 days)"
keep Record_number-Srl_no_of_item quantity expenditure Flag_quantity_data  sector
drop Filler1 Filler Level
tempfile cons_6
save `cons_6'



**************************************************************
** 6-
** Append all consumption datasets
**************************************************************

use `cons_1',clear
forvalues x=2/6 {
append using `cons_`x''
}

*Household id:
gen double hhid=10000*FSU_srl_no +1000*Segment_no + 100*second_stage_strm + Sample_hhd

*Get expenditure in Rupees:
replace expenditure=expenditure/100

gen statelabel55=" "
gen grouplabel55=" "
gen regionlabel55=" "
gen itemlabel55=" "


*make states
replace 	statelabel55=	"Andhra Pradesh"	 if  	state55==	2
replace 	statelabel55=	"Arunachal Pradesh"	 if  	state55==	3
replace 	statelabel55=	"Assam"	 if  	state55==	4
replace 	statelabel55=	"Bihar"	 if  	state55==	5
replace 	statelabel55=	"Goa"	 if  	state55==	6
replace 	statelabel55=	"Gujarat"	 if  	state55==	7
replace 	statelabel55=	"Haryana"	 if  	state55==	8
replace 	statelabel55=	"Himachal Pradesh"	 if  	state55==	9
replace 	statelabel55=	"Jammu & Kashmir"	 if  	state55==	10
replace 	statelabel55=	"Karnataka"	 if  	state55==	11
replace 	statelabel55=	"Kerela"	 if  	state55==	12
replace 	statelabel55=	"Madhya Pradesh"	 if  	state55==	13
replace 	statelabel55=	"Maharashtra"	 if  	state55==	14
replace 	statelabel55=	"Manipur"	 if  	state55==	15
replace 	statelabel55=	"Meghalaya"	 if  	state55==	16
replace 	statelabel55=	"Mizoram"	 if  	state55==	17
replace 	statelabel55=	"Nagaland"	 if  	state55==	18
replace 	statelabel55=	"Orissa"	 if  	state55==	19
replace 	statelabel55=	"Punjab"	 if  	state55==	20
replace 	statelabel55=	"Rajasthan"	 if  	state55==	21
replace 	statelabel55=	"Sikkim"	 if  	state55==	22
replace 	statelabel55=	"Tamil Nadu"	 if  	state55==	23
replace 	statelabel55=	"Tripura"	 if  	state55==	24
replace 	statelabel55=	"Uttar Pradesh"	 if  	state55==	25
replace 	statelabel55=	"West Bengal"	 if  	state55==	26
replace 	statelabel55=	"Andaman & Nicobar Islands"	 if  	state55==	27
replace 	statelabel55=	"Chandigarh"	 if  	state55==	28
replace 	statelabel55=	"Dadra & Nagar Haveli"	 if  	state55==	29
replace 	statelabel55=	"Daman and Diu"	 if  	state55==	30
replace 	statelabel55=	"Delhi"	 if  	state55==	31
replace 	statelabel55=	"Lakshadweep"	 if  	state55==	32
replace 	statelabel55=	"Pondicherry"	 if  	state55==	33

*sectors
tostring sector, replace
replace sector="Rural" if sector=="1"
replace sector="Urban" if sector=="2"

*make regions:
*the following regions appear in the data but not in the documentation: (state55, region55): (5,5) (17,0), (19,4), (20,3), (21,0), (23,0), (24,0), (26,5), (27,1)
*region 021 spelled as Costal in the R55 survey, but as Coastal in the R50 survey
replace 	regionlabel55=	"Costal"	 if 	state55==	2	 & 	 region55==	1
replace 	regionlabel55=	"Inland Northern"	 if 	state55==	2	 & 	 region55==	2
replace 	regionlabel55=	"South - Western"	 if 	state55==	2	 & 	 region55==	3
replace 	regionlabel55=	"Inland Southern"	 if 	state55==	2	 & 	 region55==	4
replace 	regionlabel55=	"Arunachal Pradesh"	 if 	state55==	3	 & 	 region55==	1
replace 	regionlabel55=	"Plains Eastern"	 if 	state55==	4	 & 	 region55==	1
replace 	regionlabel55=	"Plains Western"	 if 	state55==	4	 & 	 region55==	2
replace 	regionlabel55=	"Hills"	 if 	state55==	4	 & 	 region55==	3
replace 	regionlabel55=	"Southern"	 if 	state55==	5	 & 	 region55==	1
replace 	regionlabel55=	"Northern"	 if 	state55==	5	 & 	 region55==	2
replace 	regionlabel55=	"Central"	 if 	state55==	5	 & 	 region55==	3
replace 	regionlabel55=	"Goa"	 if 	state55==	6	 & 	 region55==	1
replace 	regionlabel55=	"Eastern"	 if 	state55==	7	 & 	 region55==	1
replace 	regionlabel55=	"Plains Northern"	 if 	state55==	7	 & 	 region55==	2
replace 	regionlabel55=	"Plains Southern"	 if 	state55==	7	 & 	 region55==	3
replace 	regionlabel55=	"Dry Areas"	 if 	state55==	7	 & 	 region55==	4
replace 	regionlabel55=	"Saurashtra"	 if 	state55==	7	 & 	 region55==	5
replace 	regionlabel55=	"Eastern"	 if 	state55==	8	 & 	 region55==	1
replace 	regionlabel55=	"Western"	 if 	state55==	8	 & 	 region55==	2
replace 	regionlabel55=	"Himachal Pradesh"	 if 	state55==	9	 & 	 region55==	1
replace 	regionlabel55=	"Mountainous"	 if 	state55==	10	 & 	 region55==	1
replace 	regionlabel55=	"Outer Hills"	 if 	state55==	10	 & 	 region55==	2
replace 	regionlabel55=	"Jhelam Valley"	 if 	state55==	10	 & 	 region55==	3
replace 	regionlabel55=	"Coastal & Ghats"	 if 	state55==	11	 & 	 region55==	1
replace 	regionlabel55=	"Inland Eastern"	 if 	state55==	11	 & 	 region55==	2
replace 	regionlabel55=	"Inland Southern"	 if 	state55==	11	 & 	 region55==	3
replace 	regionlabel55=	"Inland Northern"	 if 	state55==	11	 & 	 region55==	4
replace 	regionlabel55=	"Northern"	 if 	state55==	12	 & 	 region55==	1
replace 	regionlabel55=	"Southern"	 if 	state55==	12	 & 	 region55==	2
replace 	regionlabel55=	"Chattisgarh"	 if 	state55==	13	 & 	 region55==	1
replace 	regionlabel55=	"Vindhya"	 if 	state55==	13	 & 	 region55==	2
replace 	regionlabel55=	"Central"	 if 	state55==	13	 & 	 region55==	3
replace 	regionlabel55=	"Malwa"	 if 	state55==	13	 & 	 region55==	4
replace 	regionlabel55=	"South"	 if 	state55==	13	 & 	 region55==	5
replace 	regionlabel55=	"South Western"	 if 	state55==	13	 & 	 region55==	6
replace 	regionlabel55=	"Northern"	 if 	state55==	13	 & 	 region55==	7
replace 	regionlabel55=	"Coastal"	 if 	state55==	14	 & 	 region55==	1
replace 	regionlabel55=	"Inland Western"	 if 	state55==	14	 & 	 region55==	2
replace 	regionlabel55=	"Inland Northern"	 if 	state55==	14	 & 	 region55==	3
replace 	regionlabel55=	"Inland Central"	 if 	state55==	14	 & 	 region55==	4
replace 	regionlabel55=	"Inland Eastern"	 if 	state55==	14	 & 	 region55==	5
replace 	regionlabel55=	"Eastern"	 if 	state55==	14	 & 	 region55==	6
replace 	regionlabel55=	"Plains"	 if 	state55==	15	 & 	 region55==	1
replace 	regionlabel55=	"Hills"	 if 	state55==	15	 & 	 region55==	2
replace 	regionlabel55=	"Meghalaya"	 if 	state55==	16	 & 	 region55==	1
replace 	regionlabel55=	"Mizoram"	 if 	state55==	17	 & 	 region55==	1
replace 	regionlabel55=	"Nagaland"	 if 	state55==	18	 & 	 region55==	1
replace 	regionlabel55=	"Coastal"	 if 	state55==	19	 & 	 region55==	1
replace 	regionlabel55=	"Southern"	 if 	state55==	19	 & 	 region55==	2
replace 	regionlabel55=	"Northern"	 if 	state55==	19	 & 	 region55==	3
replace 	regionlabel55=	"Northern"	 if 	state55==	20	 & 	 region55==	1
replace 	regionlabel55=	"Southern"	 if 	state55==	20	 & 	 region55==	2
replace 	regionlabel55=	"Western"	 if 	state55==	21	 & 	 region55==	1
replace 	regionlabel55=	"North Eastern"	 if 	state55==	21	 & 	 region55==	2
replace 	regionlabel55=	"Southern"	 if 	state55==	21	 & 	 region55==	3
replace 	regionlabel55=	"South Eastern"	 if 	state55==	21	 & 	 region55==	4
replace 	regionlabel55=	"Sikkim"	 if 	state55==	22	 & 	 region55==	1
replace 	regionlabel55=	"Coastal Northern"	 if 	state55==	23	 & 	 region55==	1
replace 	regionlabel55=	"Coastal"	 if 	state55==	23	 & 	 region55==	2
replace 	regionlabel55=	"Southern"	 if 	state55==	23	 & 	 region55==	3
replace 	regionlabel55=	"Inland"	 if 	state55==	23	 & 	 region55==	4
replace 	regionlabel55=	"Tripura"	 if 	state55==	24	 & 	 region55==	1
replace 	regionlabel55=	"Himalayan"	 if 	state55==	25	 & 	 region55==	1
replace 	regionlabel55=	"Western"	 if 	state55==	25	 & 	 region55==	2
replace 	regionlabel55=	"Central"	 if 	state55==	25	 & 	 region55==	3
replace 	regionlabel55=	"Eastern"	 if 	state55==	25	 & 	 region55==	4
replace 	regionlabel55=	"Southern"	 if 	state55==	25	 & 	 region55==	5
replace 	regionlabel55=	"Himalayan"	 if 	state55==	26	 & 	 region55==	1
replace 	regionlabel55=	"Eastern Plains"	 if 	state55==	26	 & 	 region55==	2
replace 	regionlabel55=	"Central Plains"	 if 	state55==	26	 & 	 region55==	3
replace 	regionlabel55=	"Western Plains"	 if 	state55==	26	 & 	 region55==	4
replace 	regionlabel55=	"Andaman & Nicobar Islands"	 if 	state55==	27	 & 	 region55==	1
replace 	regionlabel55=	"Chandigarh"	 if 	state55==	28	 & 	 region55==	1
replace 	regionlabel55=	"Dadra & Nagar Haveli"	 if 	state55==	29	 & 	 region55==	1
replace 	regionlabel55=	"Daman & Diu"	 if 	state55==	30	 & 	 region55==	1
replace 	regionlabel55=	"Delhi"	 if 	state55==	31	 & 	 region55==	1
replace 	regionlabel55=	"Lakshadweep"	 if 	state55==	32	 & 	 region55==	1
replace 	regionlabel55=	"Pondicherry"	 if 	state55==	33	 & 	 region55==	1

*make itemcodes
replace 	itemlabel55=	"Rice - P.D.S"	 if 	 Srl_no_of_item==	101
replace 	itemlabel55=	"Rice - other sources"	 if 	 Srl_no_of_item==	102
replace 	itemlabel55=	"Chira"	 if 	 Srl_no_of_item==	103
replace 	itemlabel55=	"Khoi, lawa"	 if 	 Srl_no_of_item==	104
replace 	itemlabel55=	"Muri"	 if 	 Srl_no_of_item==	105
replace 	itemlabel55=	"Other rice products"	 if 	 Srl_no_of_item==	106
replace 	itemlabel55=	"Wheat/atta-P.D.S"	 if 	 Srl_no_of_item==	107
replace 	itemlabel55=	"Wheat/atta-other sources"	 if 	 Srl_no_of_item==	108
replace 	itemlabel55=	"Maida"	 if 	 Srl_no_of_item==	110
replace 	itemlabel55=	"Suji, Rawa"	 if 	 Srl_no_of_item==	111
replace 	itemlabel55=	"Sewai, noodles"	 if 	 Srl_no_of_item==	112
replace 	itemlabel55=	"Bread (bakery)"	 if 	 Srl_no_of_item==	113
replace 	itemlabel55=	"Other wheat products"	 if 	 Srl_no_of_item==	114
replace 	itemlabel55=	"Jowar & products"	 if 	 Srl_no_of_item==	115
replace 	itemlabel55=	"Bajra & products"	 if 	 Srl_no_of_item==	116
replace 	itemlabel55=	"Maize & products"	 if 	 Srl_no_of_item==	117
replace 	itemlabel55=	"Barley & products"	 if 	 Srl_no_of_item==	118
replace 	itemlabel55=	"Small millets & products"	 if 	 Srl_no_of_item==	120
replace 	itemlabel55=	"Ragi & products"	 if 	 Srl_no_of_item==	121
replace 	itemlabel55=	"Total cereal"	 if 	 Srl_no_of_item==	129
replace 	itemlabel55=	"Other cereals "	 if 	 Srl_no_of_item==	122
replace 	itemlabel55=	"Gram (whole)"	 if 	 Srl_no_of_item==	142
replace 	itemlabel55=	"Gram products"	 if 	 Srl_no_of_item==	151
replace 	itemlabel55=	"cereal substitutes (tapioca, jackfruit seed etc.)"	 if 	 Srl_no_of_item==	139
replace 	itemlabel55=	"Arhar  (tur)"	 if 	 Srl_no_of_item==	140
replace 	itemlabel55=	"Gram (split)"	 if 	 Srl_no_of_item==	141
replace 	itemlabel55=	"Moong"	 if 	 Srl_no_of_item==	143
replace 	itemlabel55=	"Masur"	 if 	 Srl_no_of_item==	144
replace 	itemlabel55=	"Urd"	 if 	 Srl_no_of_item==	145
replace 	itemlabel55=	"Khesari"	 if 	 Srl_no_of_item==	148
replace 	itemlabel55=	"Peas dry"	 if 	 Srl_no_of_item==	146
replace 	itemlabel55=	"soyabean"	 if 	 Srl_no_of_item==	147
replace 	itemlabel55=	"Other pulses"	 if 	 Srl_no_of_item==	150
replace 	itemlabel55=	"Besan"	 if 	 Srl_no_of_item==	152
replace 	itemlabel55=	"Total pulse products"	 if 	 Srl_no_of_item==	159
replace 	itemlabel55=	"Other pulse products"	 if 	 Srl_no_of_item==	153
replace 	itemlabel55=	"Milk: liquid (litre)"	 if 	 Srl_no_of_item==	160
replace 	itemlabel55=	"Baby food"	 if 	 Srl_no_of_item==	161
replace 	itemlabel55=	"Milk: condensed/ powder"	 if 	 Srl_no_of_item==	162
replace 	itemlabel55=	"Curd"	 if 	 Srl_no_of_item==	163
replace 	itemlabel55=	"Ghee"	 if 	 Srl_no_of_item==	164
replace 	itemlabel55=	"Butter"	 if 	 Srl_no_of_item==	165
replace 	itemlabel55=	"Ice-cream"	 if 	 Srl_no_of_item==	166
replace 	itemlabel55=	"Other milk products"	 if 	 Srl_no_of_item==	167
replace 	itemlabel55=	"total milk and milk products"	 if 	 Srl_no_of_item==	169
replace 	itemlabel55=	"Vanaspati, margarine"	 if 	 Srl_no_of_item==	170
replace 	itemlabel55=	"Ground nut oil"	 if 	 Srl_no_of_item==	172
replace 	itemlabel55=	"Mustard oil"	 if 	 Srl_no_of_item==	171
replace 	itemlabel55=	"Coconut oil"	 if 	 Srl_no_of_item==	173
replace 	itemlabel55=	"Edible oil total"	 if 	 Srl_no_of_item==	179
replace 	itemlabel55=	"Edible oil (others)"	 if 	 Srl_no_of_item==	174
replace 	itemlabel55=	"Goat meat/mutton"	 if 	 Srl_no_of_item==	182
replace 	itemlabel55=	"Beef/ buffalo meat"	 if 	 Srl_no_of_item==	183
replace 	itemlabel55=	"Pork"	 if 	 Srl_no_of_item==	184
replace 	itemlabel55=	"Chicken"	 if 	 Srl_no_of_item==	185
replace 	itemlabel55=	"Others (birds, crab, oyster, tortoise, etc.)"	 if 	 Srl_no_of_item==	186
replace 	itemlabel55=	"Eggs (no.)"	 if 	 Srl_no_of_item==	180
replace 	itemlabel55=	"Egg, fish, and meat total"	 if 	 Srl_no_of_item==	189
replace 	itemlabel55=	"Fish, prawn"	 if 	 Srl_no_of_item==	181
replace 	itemlabel55=	"Potato"	 if 	 Srl_no_of_item==	190
replace 	itemlabel55=	"Arum"	 if 	 Srl_no_of_item==	197
replace 	itemlabel55=	"Radish"	 if 	 Srl_no_of_item==	192
replace 	itemlabel55=	"Carrot"	 if 	 Srl_no_of_item==	193
replace 	itemlabel55=	"Turnip"	 if 	 Srl_no_of_item==	194
replace 	itemlabel55=	"Beet"	 if 	 Srl_no_of_item==	195
replace 	itemlabel55=	"Sweet potato"	 if 	 Srl_no_of_item==	196
replace 	itemlabel55=	"Onion"	 if 	 Srl_no_of_item==	191
replace 	itemlabel55=	"Pumpkin"	 if 	 Srl_no_of_item==	198
replace 	itemlabel55=	"Gourd"	 if 	 Srl_no_of_item==	200
replace 	itemlabel55=	"Bitter gourd"	 if 	 Srl_no_of_item==	201
replace 	itemlabel55=	"Cucumber"	 if 	 Srl_no_of_item==	202
replace 	itemlabel55=	"Parwal/patal"	 if 	 Srl_no_of_item==	203
replace 	itemlabel55=	"Jhinga/torai"	 if 	 Srl_no_of_item==	204
replace 	itemlabel55=	"Snake gourd"	 if 	 Srl_no_of_item==	205
replace 	itemlabel55=	"papaya (green)"	 if 	 Srl_no_of_item==	206
replace 	itemlabel55=	"Cauliflower"	 if 	 Srl_no_of_item==	207
replace 	itemlabel55=	"Cabbage"	 if 	 Srl_no_of_item==	208
replace 	itemlabel55=	"Brinjal"	 if 	 Srl_no_of_item==	210
replace 	itemlabel55=	"Lady's finger"	 if 	 Srl_no_of_item==	211
replace 	itemlabel55=	"Palak/other leafy vegetables"	 if 	 Srl_no_of_item==	212
replace 	itemlabel55=	"French beans and barbati"	 if 	 Srl_no_of_item==	213
replace 	itemlabel55=	"Tomato"	 if 	 Srl_no_of_item==	214
replace 	itemlabel55=	"Peas fresh"	 if 	 Srl_no_of_item==	215
replace 	itemlabel55=	"Chillis (green)"	 if 	 Srl_no_of_item==	216
replace 	itemlabel55=	"Capsicum"	 if 	 Srl_no_of_item==	217
replace 	itemlabel55=	"Plantain (green)"	 if 	 Srl_no_of_item==	218
replace 	itemlabel55=	"Jackfruit (green)"	 if 	 Srl_no_of_item==	220
replace 	itemlabel55=	"Lemon (no.)"	 if 	 Srl_no_of_item==	221
replace 	itemlabel55=	"Other vegetables"	 if 	 Srl_no_of_item==	222
replace 	itemlabel55=	"total vegetables"	 if 	 Srl_no_of_item==	229
replace 	itemlabel55=	"Banana (no.)"	 if 	 Srl_no_of_item==	230
replace 	itemlabel55=	"Jackfruit"	 if 	 Srl_no_of_item==	231
replace 	itemlabel55=	"Watermelon"	 if 	 Srl_no_of_item==	232
replace 	itemlabel55=	"Pineapple (no.)"	 if 	 Srl_no_of_item==	233
replace 	itemlabel55=	"Coconut (no.)"	 if 	 Srl_no_of_item==	234
replace 	itemlabel55=	"Guava"	 if 	 Srl_no_of_item==	235
replace 	itemlabel55=	"Singara"	 if 	 Srl_no_of_item==	236
replace 	itemlabel55=	"Orange, mausami (no.)"	 if 	 Srl_no_of_item==	237
replace 	itemlabel55=	"papaya"	 if 	 Srl_no_of_item==	238
replace 	itemlabel55=	"Mango"	 if 	 Srl_no_of_item==	240
replace 	itemlabel55=	"Kharbooza"	 if 	 Srl_no_of_item==	241
replace 	itemlabel55=	"Pears (naspati)"	 if 	 Srl_no_of_item==	242
replace 	itemlabel55=	"Berries"	 if 	 Srl_no_of_item==	243
replace 	itemlabel55=	"Leechi"	 if 	 Srl_no_of_item==	244
replace 	itemlabel55=	"Apple"	 if 	 Srl_no_of_item==	245
replace 	itemlabel55=	"Grapes"	 if 	 Srl_no_of_item==	246
replace 	itemlabel55=	"Other fresh fruits"	 if 	 Srl_no_of_item==	247
replace 	itemlabel55=	"total fruits (fresh)"	 if 	 Srl_no_of_item==	249
replace 	itemlabel55=	"Coconut (copra)"	 if 	 Srl_no_of_item==	250
replace 	itemlabel55=	"Groundnut"	 if 	 Srl_no_of_item==	251
replace 	itemlabel55=	"Dates"	 if 	 Srl_no_of_item==	252
replace 	itemlabel55=	"Cashewnut"	 if 	 Srl_no_of_item==	253
replace 	itemlabel55=	"Walnut"	 if 	 Srl_no_of_item==	254
replace 	itemlabel55=	"Other nuts"	 if 	 Srl_no_of_item==	255
replace 	itemlabel55=	"Raisin (kishmish, monacca, etc.)"	 if 	 Srl_no_of_item==	256
replace 	itemlabel55=	"Other dry fruits"	 if 	 Srl_no_of_item==	257
replace 	itemlabel55=	"total fruits (dry)"	 if 	 Srl_no_of_item==	259
replace 	itemlabel55=	"Sugar - P.D.S"	 if 	 Srl_no_of_item==	260
replace 	itemlabel55=	"Sugar - other sources"	 if 	 Srl_no_of_item==	261
replace 	itemlabel55=	"Gur"	 if 	 Srl_no_of_item==	262
replace 	itemlabel55=	"Candy (misri)"	 if 	 Srl_no_of_item==	263
replace 	itemlabel55=	"Honey"	 if 	 Srl_no_of_item==	264
replace 	itemlabel55=	"total sugar"	 if 	 Srl_no_of_item==	269
replace 	itemlabel55=	"Salt "	 if 	 Srl_no_of_item==	279
replace 	itemlabel55=	"Turmeric (gm)"	 if 	 Srl_no_of_item==	280
replace 	itemlabel55=	"Black pepper (gm)"	 if 	 Srl_no_of_item==	281
replace 	itemlabel55=	"Dry chillies (gm)"	 if 	 Srl_no_of_item==	282
replace 	itemlabel55=	"Garlic (gm)"	 if 	 Srl_no_of_item==	283
replace 	itemlabel55=	"Tamarind (gm)"	 if 	 Srl_no_of_item==	284
replace 	itemlabel55=	"Ginger (gm)"	 if 	 Srl_no_of_item==	285
replace 	itemlabel55=	"Curry powder (gm)"	 if 	 Srl_no_of_item==	286
replace 	itemlabel55=	"oilseeds (gm)"	 if 	 Srl_no_of_item==	287
replace 	itemlabel55=	"Other spices (gm)"	 if 	 Srl_no_of_item==	288
replace 	itemlabel55=	"total spices"	 if 	 Srl_no_of_item==	289
replace 	itemlabel55=	"Tea : cups (no.)"	 if 	 Srl_no_of_item==	290
replace 	itemlabel55=	"Tea : leaf (gm)"	 if 	 Srl_no_of_item==	291
replace 	itemlabel55=	"Coffee : cups (no.)"	 if 	 Srl_no_of_item==	292
replace 	itemlabel55=	"Coffee: powder (gm)"	 if 	 Srl_no_of_item==	293
replace 	itemlabel55=	"Ice  "	 if 	 Srl_no_of_item==	294
replace 	itemlabel55=	"Cold beverages: bottled/canned (no.)"	 if 	 Srl_no_of_item==	295
replace 	itemlabel55=	"Fruit juice and shake (glass)"	 if 	 Srl_no_of_item==	296
replace 	itemlabel55=	"Coconut: green (no.)"	 if 	 Srl_no_of_item==	297
replace 	itemlabel55=	"Other beverages (cocoa, chocolate, etc.)"	 if 	 Srl_no_of_item==	298
replace 	itemlabel55=	"Biscuits"	 if 	 Srl_no_of_item==	300
replace 	itemlabel55=	"Salted refreshments"	 if 	 Srl_no_of_item==	301
replace 	itemlabel55=	"Prepared sweets"	 if 	 Srl_no_of_item==	302
replace 	itemlabel55=	"Cooked meals (no.)"	 if 	 Srl_no_of_item==	303
replace 	itemlabel55=	"Cake, pastry"	 if 	 Srl_no_of_item==	304
replace 	itemlabel55=	"Pickles (gm.)"	 if 	 Srl_no_of_item==	305
replace 	itemlabel55=	"Sauce (gm.)"	 if 	 Srl_no_of_item==	306
replace 	itemlabel55=	"Jam, jelly (gm.)"	 if 	 Srl_no_of_item==	307
replace 	itemlabel55=	"Other processed food (gm.)"	 if 	 Srl_no_of_item==	308
replace 	itemlabel55=	"total beverages"	 if 	 Srl_no_of_item==	309
replace 	itemlabel55=	"Pan: leaf (no.)"	 if 	 Srl_no_of_item==	310
replace 	itemlabel55=	"Pan: finished (no.)"	 if 	 Srl_no_of_item==	311
replace 	itemlabel55=	"Supari (gm)"	 if 	 Srl_no_of_item==	312
replace 	itemlabel55=	"lime(gm.)"	 if 	 Srl_no_of_item==	313
replace 	itemlabel55=	"katha (gm)"	 if 	 Srl_no_of_item==	314
replace 	itemlabel55=	"other ingredients for pan (gm)"	 if 	 Srl_no_of_item==	315
replace 	itemlabel55=	"total pan"	 if 	 Srl_no_of_item==	319
replace 	itemlabel55=	"Bidi (no.)"	 if 	 Srl_no_of_item==	320
replace 	itemlabel55=	"Cigarettes (no.)"	 if 	 Srl_no_of_item==	321
replace 	itemlabel55=	"Leaf tobacco (gm)"	 if 	 Srl_no_of_item==	322
replace 	itemlabel55=	"Snuff (gm)"	 if 	 Srl_no_of_item==	323
replace 	itemlabel55=	"Hookah tobacco"	 if 	 Srl_no_of_item==	324
replace 	itemlabel55=	"Cheroot (no.)"	 if 	 Srl_no_of_item==	325
replace 	itemlabel55=	"Zarda, kimam, surti (gm)"	 if 	 Srl_no_of_item==	326
replace 	itemlabel55=	"Other tobacco products (gm)"	 if 	 Srl_no_of_item==	327
replace 	itemlabel55=	"total tobacco"	 if 	 Srl_no_of_item==	329
replace 	itemlabel55=	"Ganja (gm)"	 if 	 Srl_no_of_item==	330
replace 	itemlabel55=	"Toddy (litre)"	 if 	 Srl_no_of_item==	331
replace 	itemlabel55=	"Country liquor (litre)"	 if 	 Srl_no_of_item==	332
replace 	itemlabel55=	"Beer (litre)"	 if 	 Srl_no_of_item==	333
replace 	itemlabel55=	"Foreign liquor or refined liquor (litre)"	 if 	 Srl_no_of_item==	334
replace 	itemlabel55=	"Other intoxicants"	 if 	 Srl_no_of_item==	335
replace 	itemlabel55=	"total intoxicants"	 if 	 Srl_no_of_item==	339
replace 	itemlabel55=	"Coke"	 if 	 Srl_no_of_item==	340
replace 	itemlabel55=	"Firewood and chips"	 if 	 Srl_no_of_item==	341
replace 	itemlabel55=	"Electricity (std. unit)"	 if 	 Srl_no_of_item==	342
replace 	itemlabel55=	"Dung cake"	 if 	 Srl_no_of_item==	343
replace 	itemlabel55=	"Kerosene - P.D.S (litre)"	 if 	 Srl_no_of_item==	344
replace 	itemlabel55=	"Kerosene - other sources (litre)"	 if 	 Srl_no_of_item==	345
replace 	itemlabel55=	"Matches (box)"	 if 	 Srl_no_of_item==	346
replace 	itemlabel55=	"Coal"	 if 	 Srl_no_of_item==	347
replace 	itemlabel55=	"L.P.G"	 if 	 Srl_no_of_item==	348
replace 	itemlabel55=	"Charcoal"	 if 	 Srl_no_of_item==	350
replace 	itemlabel55=	"Candle (no.)"	 if 	 Srl_no_of_item==	351
replace 	itemlabel55=	"Gobar gas"	 if 	 Srl_no_of_item==	352
replace 	itemlabel55=	"Other fuel"	 if 	 Srl_no_of_item==	353
replace 	itemlabel55=	"total fuel and light"	 if 	 Srl_no_of_item==	359
replace 	itemlabel55=	"dhoti (m)"	 if 	 Srl_no_of_item==	360
replace 	itemlabel55=	"sari (m)"	 if 	 Srl_no_of_item==	361
replace 	itemlabel55=	"cloth for shirt, pyjama, salwar etc. (m)"	 if 	 Srl_no_of_item==	362
replace 	itemlabel55=	"cloth for coat, trousers, overcoat etc. (m)"	 if 	 Srl_no_of_item==	363
replace 	itemlabel55=	"chaddar, dopatta, wrapper, shawl, etc (no.)"	 if 	 Srl_no_of_item==	364
replace 	itemlabel55=	"lungi (no.)"	 if 	 Srl_no_of_item==	365
replace 	itemlabel55=	"gamcha, towel, handkerchief (no.)"	 if 	 Srl_no_of_item==	366
replace 	itemlabel55=	"hosiery articles, stockings, undergarments (no.)"	 if 	 Srl_no_of_item==	367
replace 	itemlabel55=	"readymade garments (no.)"	 if 	 Srl_no_of_item==	368
replace 	itemlabel55=	"headwear (no.)"	 if 	 Srl_no_of_item==	370
replace 	itemlabel55=	"knitted garments, sweater, pullover, cardigan, muffler, scarf etc. (no.)"	 if 	 Srl_no_of_item==	371
replace 	itemlabel55=	"total clothing"	 if 	 Srl_no_of_item==	379
replace 	itemlabel55=	"bedsheet, bedcover (no.)"	 if 	 Srl_no_of_item==	380
replace 	itemlabel55=	"rug, blanket (no.)"	 if 	 Srl_no_of_item==	381
replace 	itemlabel55=	"pillow, quilt, mattress (no.)"	 if 	 Srl_no_of_item==	382
replace 	itemlabel55=	"cloth for upholstery, curtain, tablecloth etc. (m)"	 if 	 Srl_no_of_item==	383
replace 	itemlabel55=	"mosquito net (no.)"	 if 	 Srl_no_of_item==	384
replace 	itemlabel55=	"mats and matting (no.)"	 if 	 Srl_no_of_item==	385
replace 	itemlabel55=	"cotton  (gm)"	 if 	 Srl_no_of_item==	386
replace 	itemlabel55=	"bedding: others"	 if 	 Srl_no_of_item==	387
replace 	itemlabel55=	"total bedding"	 if 	 Srl_no_of_item==	389
replace 	itemlabel55=	"knitting wool, cotton, yarn (gm)"	 if 	 Srl_no_of_item==	372
replace 	itemlabel55=	"clothing: others"	 if 	 Srl_no_of_item==	373
replace 	itemlabel55=	"second-hand clothing"	 if 	 Srl_no_of_item==	374
replace 	itemlabel55=	"leather boots, shoes (pair)"	 if 	 Srl_no_of_item==	390
replace 	itemlabel55=	"leather sandals, chappals, etc. (pair)"	 if 	 Srl_no_of_item==	391
replace 	itemlabel55=	"other leather footwear (pair)"	 if 	 Srl_no_of_item==	392
replace 	itemlabel55=	"rubber/PVC footwear (pair)"	 if 	 Srl_no_of_item==	393
replace 	itemlabel55=	"other footwear (pair)"	 if 	 Srl_no_of_item==	394
replace 	itemlabel55=	"total footwear"	 if 	 Srl_no_of_item==	399
replace 	itemlabel55=	"cinema, theatre"	 if 	 Srl_no_of_item==	430
replace 	itemlabel55=	"mela, fair, picnic"	 if 	 Srl_no_of_item==	431
replace 	itemlabel55=	"sports goods, toys, etc."	 if 	 Srl_no_of_item==	432
replace 	itemlabel55=	"club fees"	 if 	 Srl_no_of_item==	433
replace 	itemlabel55=	"goods for recreation and hobbies"	 if 	 Srl_no_of_item==	434
replace 	itemlabel55=	"photography"	 if 	 Srl_no_of_item==	435
replace 	itemlabel55=	"video cassette / V.C.R. / V.C.P.(hire)"	 if 	 Srl_no_of_item==	436
replace 	itemlabel55=	"other amusement"	 if 	 Srl_no_of_item==	437
replace 	itemlabel55=	"total entertainment"	 if 	 Srl_no_of_item==	439
replace 	itemlabel55=	"books, journals"	 if 	 Srl_no_of_item==	400
replace 	itemlabel55=	"newspapers, periodicals"	 if 	 Srl_no_of_item==	401
replace 	itemlabel55=	"library charges"	 if 	 Srl_no_of_item==	402
replace 	itemlabel55=	"stationary articles"	 if 	 Srl_no_of_item==	403
replace 	itemlabel55=	"tuition and other fees (school, college, etc.)"	 if 	 Srl_no_of_item==	404
replace 	itemlabel55=	"private tutor/coaching centre"	 if 	 Srl_no_of_item==	405
replace 	itemlabel55=	"other educational expenses"	 if 	 Srl_no_of_item==	406
replace 	itemlabel55=	"total education"	 if 	 Srl_no_of_item==	409
replace 	itemlabel55=	"medicine"	 if 	 Srl_no_of_item==	410
replace 	itemlabel55=	"X-ray, ECG, pathological test etc."	 if 	 Srl_no_of_item==	411
replace 	itemlabel55=	"doctor's/surgeon's fee"	 if 	 Srl_no_of_item==	412
replace 	itemlabel55=	"hospital & nursing home charges"	 if 	 Srl_no_of_item==	413
replace 	itemlabel55=	"other medical expenses"	 if 	 Srl_no_of_item==	414
replace 	itemlabel55=	"total medicine  - institutional"	 if 	 Srl_no_of_item==	419
replace 	itemlabel55=	"medicine"	 if 	 Srl_no_of_item==	420
replace 	itemlabel55=	"X-ray, ECG, pathological test etc."	 if 	 Srl_no_of_item==	421
replace 	itemlabel55=	"doctor's/surgeon's fee"	 if 	 Srl_no_of_item==	422
replace 	itemlabel55=	"family planning appliances"	 if 	 Srl_no_of_item==	423
replace 	itemlabel55=	"other medical expenses"	 if 	 Srl_no_of_item==	424
replace 	itemlabel55=	"total medicine - non institutional"	 if 	 Srl_no_of_item==	429
replace 	itemlabel55=	"spectacles"	 if 	 Srl_no_of_item==	440
replace 	itemlabel55=	"torch"	 if 	 Srl_no_of_item==	441
replace 	itemlabel55=	"pen"	 if 	 Srl_no_of_item==	442
replace 	itemlabel55=	"lock"	 if 	 Srl_no_of_item==	443
replace 	itemlabel55=	"umbrella, rain-coat"	 if 	 Srl_no_of_item==	444
replace 	itemlabel55=	"lighter (bidi/cigarette/gas stove)"	 if 	 Srl_no_of_item==	445
replace 	itemlabel55=	"other goods for personal care and effects"	 if 	 Srl_no_of_item==	446
replace 	itemlabel55=	"Total personal care and effect"	 if 	 Srl_no_of_item==	449
replace 	itemlabel55=	"toilet soap"	 if 	 Srl_no_of_item==	450
replace 	itemlabel55=	"toothbrush, toothpaste, etc."	 if 	 Srl_no_of_item==	451
replace 	itemlabel55=	"powder, snow, cream"	 if 	 Srl_no_of_item==	452
replace 	itemlabel55=	"hair oil, lotion, shampoo, hair cream"	 if 	 Srl_no_of_item==	453
replace 	itemlabel55=	"comb"	 if 	 Srl_no_of_item==	454
replace 	itemlabel55=	"shaving blades, shaving stick, razor"	 if 	 Srl_no_of_item==	455
replace 	itemlabel55=	"shaving cream"	 if 	 Srl_no_of_item==	456
replace 	itemlabel55=	"sanitary napkins"	 if 	 Srl_no_of_item==	457
replace 	itemlabel55=	"total toilet articles"	 if 	 Srl_no_of_item==	459
replace 	itemlabel55=	"other toilet articles"	 if 	 Srl_no_of_item==	458
replace 	itemlabel55=	"electric bulb, tube light"	 if 	 Srl_no_of_item==	460
replace 	itemlabel55=	"electric batteries"	 if 	 Srl_no_of_item==	461
replace 	itemlabel55=	"other non-durable electric goods"	 if 	 Srl_no_of_item==	462
replace 	itemlabel55=	"earthen ware"	 if 	 Srl_no_of_item==	463
replace 	itemlabel55=	"glass ware"	 if 	 Srl_no_of_item==	464
replace 	itemlabel55=	"bucket, water bottle/feeding bottle & other plastic goods"	 if 	 Srl_no_of_item==	465
replace 	itemlabel55=	"coir, rope, etc"	 if 	 Srl_no_of_item==	466
replace 	itemlabel55=	"washing soap/soda"	 if 	 Srl_no_of_item==	467
replace 	itemlabel55=	"other washing requisites"	 if 	 Srl_no_of_item==	468
replace 	itemlabel55=	"agarbati"	 if 	 Srl_no_of_item==	470
replace 	itemlabel55=	"flower (fresh): all purposes"	 if 	 Srl_no_of_item==	471
replace 	itemlabel55=	"insecticide, acid etc."	 if 	 Srl_no_of_item==	472
replace 	itemlabel55=	"other petty articles"	 if 	 Srl_no_of_item==	473
replace 	itemlabel55=	"total sundry article"	 if 	 Srl_no_of_item==	479
replace 	itemlabel55=	"domestic servant/cook"	 if 	 Srl_no_of_item==	480
replace 	itemlabel55=	"sweeper"	 if 	 Srl_no_of_item==	481
replace 	itemlabel55=	"barber, beautician, etc."	 if 	 Srl_no_of_item==	482
replace 	itemlabel55=	"washerman, laundry, ironing"	 if 	 Srl_no_of_item==	483
replace 	itemlabel55=	"tailor"	 if 	 Srl_no_of_item==	484
replace 	itemlabel55=	"priest"	 if 	 Srl_no_of_item==	485
replace 	itemlabel55=	"legal expenses"	 if 	 Srl_no_of_item==	486
replace 	itemlabel55=	"postage & telegram"	 if 	 Srl_no_of_item==	487
replace 	itemlabel55=	"telephone charges"	 if 	 Srl_no_of_item==	488
replace 	itemlabel55=	"repair charges for non-durable goods"	 if 	 Srl_no_of_item==	490
replace 	itemlabel55=	"grinding charges"	 if 	 Srl_no_of_item==	491
replace 	itemlabel55=	"miscellaneous expenses"	 if 	 Srl_no_of_item==	492
replace 	itemlabel55=	"other consumer services excluding conveyance"	 if 	 Srl_no_of_item==	494
replace 	itemlabel55=	"total consumer services excluding conveyance"	 if 	 Srl_no_of_item==	499
replace 	itemlabel55=	"railway fare"	 if 	 Srl_no_of_item==	501
replace 	itemlabel55=	"bus/tram fare"	 if 	 Srl_no_of_item==	502
replace 	itemlabel55=	"taxi, auto-rickshaw fare"	 if 	 Srl_no_of_item==	503
replace 	itemlabel55=	"airway fare"	 if 	 Srl_no_of_item==	500
replace 	itemlabel55=	"porter charges"	 if 	 Srl_no_of_item==	507
replace 	itemlabel55=	"steamer, boat fare"	 if 	 Srl_no_of_item==	504
replace 	itemlabel55=	"richshaw (hand drawn and cycle) fare"	 if 	 Srl_no_of_item==	505
replace 	itemlabel55=	"horse cart fare"	 if 	 Srl_no_of_item==	506
replace 	itemlabel55=	"petrol"	 if 	 Srl_no_of_item==	508
replace 	itemlabel55=	"diesel"	 if 	 Srl_no_of_item==	510
replace 	itemlabel55=	"lubricating oil"	 if 	 Srl_no_of_item==	511
replace 	itemlabel55=	"school bus/van"	 if 	 Srl_no_of_item==	512
replace 	itemlabel55=	"other hired conveyance"	 if 	 Srl_no_of_item==	513
replace 	itemlabel55=	"total conveyance"	 if 	 Srl_no_of_item==	519
replace 	itemlabel55=	"pet animals (incl. birds, fish)"	 if 	 Srl_no_of_item==	493
replace 	itemlabel55=	"house rent, garage rent (actual)"	 if 	 Srl_no_of_item==	520
replace 	itemlabel55=	"residential land rent "	 if 	 Srl_no_of_item==	521
replace 	itemlabel55=	"consumer rent (other goods)"	 if 	 Srl_no_of_item==	522
replace 	itemlabel55=	"total rent"	 if 	 Srl_no_of_item==	529
replace 	itemlabel55=	"house rent, garage rent (imputed- urban only)"	 if 	 Srl_no_of_item==	539
replace 	itemlabel55=	"water charges"	 if 	 Srl_no_of_item==	540
replace 	itemlabel55=	"other consumer taxes and cesses"	 if 	 Srl_no_of_item==	541
replace 	itemlabel55=	"total consumer taxes and cesses"	 if 	 Srl_no_of_item==	549
replace 	itemlabel55=	"bed stead"	 if 	 Srl_no_of_item==	550
replace 	itemlabel55=	"almirah, dressing table"	 if 	 Srl_no_of_item==	551
replace 	itemlabel55=	"chair, stool, bench, table"	 if 	 Srl_no_of_item==	552
replace 	itemlabel55=	"suitcase, trunk, box, hand bag and other travel goods"	 if 	 Srl_no_of_item==	553
replace 	itemlabel55=	"foam, rubber cushion (dunlopillo type)"	 if 	 Srl_no_of_item==	554
replace 	itemlabel55=	"carpet, daree, and other floor mattings"	 if 	 Srl_no_of_item==	555
replace 	itemlabel55=	"paintings, drawings, engravings, etc."	 if 	 Srl_no_of_item==	556
replace 	itemlabel55=	"other furnitures and fixtures (couch, sofa, etc.)"	 if 	 Srl_no_of_item==	557
replace 	itemlabel55=	"total furniture and fixtures"	 if 	 Srl_no_of_item==	559
replace 	itemlabel55=	"gramophone and record player"	 if 	 Srl_no_of_item==	560
replace 	itemlabel55=	"radio"	 if 	 Srl_no_of_item==	561
replace 	itemlabel55=	"television"	 if 	 Srl_no_of_item==	562
replace 	itemlabel55=	"VCR/VCP"	 if 	 Srl_no_of_item==	563
replace 	itemlabel55=	"camera and other photographic equipment"	 if 	 Srl_no_of_item==	564
replace 	itemlabel55=	"tape recorder, CD player"	 if 	 Srl_no_of_item==	565
replace 	itemlabel55=	"gramophone record, audio/video cassette"	 if 	 Srl_no_of_item==	566
replace 	itemlabel55=	"musical instruments"	 if 	 Srl_no_of_item==	567
replace 	itemlabel55=	"other goods for recreation"	 if 	 Srl_no_of_item==	568
replace 	itemlabel55=	"total goods for reaction "	 if 	 Srl_no_of_item==	569
replace 	itemlabel55=	"gold ornaments"	 if 	 Srl_no_of_item==	570
replace 	itemlabel55=	"silver ornaments"	 if 	 Srl_no_of_item==	571
replace 	itemlabel55=	"jewels, pearls"	 if 	 Srl_no_of_item==	572
replace 	itemlabel55=	"other ornaments"	 if 	 Srl_no_of_item==	573
replace 	itemlabel55=	"total jewellery and ornaments"	 if 	 Srl_no_of_item==	579
replace 	itemlabel55=	"stainless steel"	 if 	 Srl_no_of_item==	580
replace 	itemlabel55=	"other metal utensils"	 if 	 Srl_no_of_item==	581
replace 	itemlabel55=	"casseroles, thermos, thermoware"	 if 	 Srl_no_of_item==	582
replace 	itemlabel55=	"other crockery & utensils"	 if 	 Srl_no_of_item==	583
replace 	itemlabel55=	"total crockery and utensils"	 if 	 Srl_no_of_item==	589
replace 	itemlabel55=	"electric fan"	 if 	 Srl_no_of_item==	590
replace 	itemlabel55=	"stove "	 if 	 Srl_no_of_item==	595
replace 	itemlabel55=	"pressure cooker/pressure pan"	 if 	 Srl_no_of_item==	596
replace 	itemlabel55=	"sewing machine"	 if 	 Srl_no_of_item==	593
replace 	itemlabel55=	"washing machine"	 if 	 Srl_no_of_item==	594
replace 	itemlabel55=	"refrigerator"	 if 	 Srl_no_of_item==	597
replace 	itemlabel55=	"air conditioner, air cooler"	 if 	 Srl_no_of_item==	591
replace 	itemlabel55=	"lantern, lamp, electric lampshade"	 if 	 Srl_no_of_item==	592
replace 	itemlabel55=	"electric iron, heater, toaster, and other electric heating appliances"	 if 	 Srl_no_of_item==	598
replace 	itemlabel55=	"other cooking/household appliances"	 if 	 Srl_no_of_item==	600
replace 	itemlabel55=	"total cooking and household appliances"	 if 	 Srl_no_of_item==	609
replace 	itemlabel55=	"bicycle"	 if 	 Srl_no_of_item==	610
replace 	itemlabel55=	"motor cycle scooter"	 if 	 Srl_no_of_item==	611
replace 	itemlabel55=	"motor car, jeep"	 if 	 Srl_no_of_item==	612
replace 	itemlabel55=	"tyres and tubes"	 if 	 Srl_no_of_item==	613
replace 	itemlabel55=	"other transport equipment"	 if 	 Srl_no_of_item==	614
replace 	itemlabel55=	"total personal transport equipment"	 if 	 Srl_no_of_item==	619
replace 	itemlabel55=	"glass eyes, hearing aids, & orthopaedic equipment"	 if 	 Srl_no_of_item==	620
replace 	itemlabel55=	"other medical equipment"	 if 	 Srl_no_of_item==	621
replace 	itemlabel55=	"total therapeutic appliances"	 if 	 Srl_no_of_item==	629
replace 	itemlabel55=	"clock, watch"	 if 	 Srl_no_of_item==	630
replace 	itemlabel55=	"other machines for household work"	 if 	 Srl_no_of_item==	631
replace 	itemlabel55=	"any other personal goods"	 if 	 Srl_no_of_item==	632
replace 	itemlabel55=	"total personal goods"	 if 	 Srl_no_of_item==	639
replace 	itemlabel55=	"bathroom & sanitary equipment"	 if 	 Srl_no_of_item==	640
replace 	itemlabel55=	"plugs, switches & other electrical fittings"	 if 	 Srl_no_of_item==	641
replace 	itemlabel55=	"residential building and land (cost of repair only)"	 if 	 Srl_no_of_item==	642
replace 	itemlabel55=	"other durables (specify)"	 if 	 Srl_no_of_item==	643
replace 	itemlabel55=	"total residential building, land, and other durables"	 if 	 Srl_no_of_item==	649
replace 	itemlabel55=	"total durable goods"	 if 	 Srl_no_of_item==	659



*make group labels. This survey no longer uses the first 2 digits to identify seperate groups.
replace 	grouplabel=	"cereals - rice"	 if 	 Srl_no_of_item==	101
replace 	grouplabel=	"cereals - rice"	 if 	 Srl_no_of_item==	102
replace 	grouplabel=	"cereals - rice"	 if 	 Srl_no_of_item==	103
replace 	grouplabel=	"cereals - rice"	 if 	 Srl_no_of_item==	104
replace 	grouplabel=	"cereals - rice"	 if 	 Srl_no_of_item==	105
replace 	grouplabel=	"cereals - rice"	 if 	 Srl_no_of_item==	106
replace 	grouplabel=	"cereals - wheat"	 if 	 Srl_no_of_item==	107
replace 	grouplabel=	"cereals - wheat"	 if 	 Srl_no_of_item==	108
replace 	grouplabel=	"cereals - wheat"	 if 	 Srl_no_of_item==	110
replace 	grouplabel=	"cereals - wheat"	 if 	 Srl_no_of_item==	111
replace 	grouplabel=	"cereals - wheat"	 if 	 Srl_no_of_item==	112
replace 	grouplabel=	"cereals - wheat"	 if 	 Srl_no_of_item==	113
replace 	grouplabel=	"cereals - wheat"	 if 	 Srl_no_of_item==	114
replace 	grouplabel=	"cereals - jowar"	 if 	 Srl_no_of_item==	115
replace 	grouplabel=	"cereals -  bajra"	 if 	 Srl_no_of_item==	116
replace 	grouplabel=	"cereals - maize"	 if 	 Srl_no_of_item==	117
replace 	grouplabel=	"cereals - barley"	 if 	 Srl_no_of_item==	118
replace 	grouplabel=	"cereals - small millets"	 if 	 Srl_no_of_item==	120
replace 	grouplabel=	"cereals - ragi"	 if 	 Srl_no_of_item==	121
replace 	grouplabel=	"cereals - other"	 if 	 Srl_no_of_item==	129
replace 	grouplabel=	"cereals - other"	 if 	 Srl_no_of_item==	122
replace 	grouplabel=	"gram"	 if 	 Srl_no_of_item==	142
replace 	grouplabel=	"gram"	 if 	 Srl_no_of_item==	151
replace 	grouplabel=	"cereal substitutes"	 if 	 Srl_no_of_item==	139
replace 	grouplabel=	"pulses   "	 if 	 Srl_no_of_item==	140
replace 	grouplabel=	"pulses   "	 if 	 Srl_no_of_item==	141
replace 	grouplabel=	"pulses   "	 if 	 Srl_no_of_item==	143
replace 	grouplabel=	"pulses   "	 if 	 Srl_no_of_item==	144
replace 	grouplabel=	"pulses   "	 if 	 Srl_no_of_item==	145
replace 	grouplabel=	"pulses   "	 if 	 Srl_no_of_item==	148
replace 	grouplabel=	"pulses   "	 if 	 Srl_no_of_item==	146
replace 	grouplabel=	"pulses   "	 if 	 Srl_no_of_item==	147
replace 	grouplabel=	"pulses   "	 if 	 Srl_no_of_item==	150
replace 	grouplabel=	"pulse products"	 if 	 Srl_no_of_item==	152
replace 	grouplabel=	"pulse products"	 if 	 Srl_no_of_item==	159
replace 	grouplabel=	"pulse products"	 if 	 Srl_no_of_item==	153
replace 	grouplabel=	"milk and milk products"	 if 	 Srl_no_of_item==	160
replace 	grouplabel=	"milk and milk products"	 if 	 Srl_no_of_item==	161
replace 	grouplabel=	"milk and milk products"	 if 	 Srl_no_of_item==	162
replace 	grouplabel=	"milk and milk products"	 if 	 Srl_no_of_item==	163
replace 	grouplabel=	"milk and milk products"	 if 	 Srl_no_of_item==	164
replace 	grouplabel=	"milk and milk products"	 if 	 Srl_no_of_item==	165
replace 	grouplabel=	"milk and milk products"	 if 	 Srl_no_of_item==	166
replace 	grouplabel=	"milk and milk products"	 if 	 Srl_no_of_item==	167
replace 	grouplabel=	"milk and milk products"	 if 	 Srl_no_of_item==	169
replace 	grouplabel=	"edible oils - processed"	 if 	 Srl_no_of_item==	170
replace 	grouplabel=	"edible oils - processed"	 if 	 Srl_no_of_item==	171
replace 	grouplabel=	"edible oils - processed"	 if 	 Srl_no_of_item==	172
replace 	grouplabel=	"edible oils - processed"	 if 	 Srl_no_of_item==	173
replace 	grouplabel=	"edible oils"	 if 	 Srl_no_of_item==	179
replace 	grouplabel=	"edible oils"	 if 	 Srl_no_of_item==	174
replace 	grouplabel=	"meat, egg, fish - red meat"	 if 	 Srl_no_of_item==	182
replace 	grouplabel=	"meat, egg, fish - red meat"	 if 	 Srl_no_of_item==	183
replace 	grouplabel=	"meat, egg, fish - red meat"	 if 	 Srl_no_of_item==	184
replace 	grouplabel=	"meat, egg, fish - poultry and fish"	 if 	 Srl_no_of_item==	185
replace 	grouplabel=	"meat, egg, fish - poultry and fish"	 if 	 Srl_no_of_item==	186
replace 	grouplabel=	"meat, egg, fish - poultry and fish"	 if 	 Srl_no_of_item==	180
replace 	grouplabel=	"meat, egg, fish - poultry and fish"	 if 	 Srl_no_of_item==	189
replace 	grouplabel=	"meat, egg, fish - poultry and fish"	 if 	 Srl_no_of_item==	181
replace 	grouplabel=	"vegetable - root vegetables"	 if 	 Srl_no_of_item==	190
replace 	grouplabel=	"vegetable - root vegetables"	 if 	 Srl_no_of_item==	197
replace 	grouplabel=	"vegetable - root vegetables"	 if 	 Srl_no_of_item==	192
replace 	grouplabel=	"vegetable - root vegetables"	 if 	 Srl_no_of_item==	193
replace 	grouplabel=	"vegetable - root vegetables"	 if 	 Srl_no_of_item==	194
replace 	grouplabel=	"vegetable - root vegetables"	 if 	 Srl_no_of_item==	195
replace 	grouplabel=	"vegetable - root vegetables"	 if 	 Srl_no_of_item==	196
replace 	grouplabel=	"vegetable - root vegetables"	 if 	 Srl_no_of_item==	191
replace 	grouplabel=	"vegetable - gourds"	 if 	 Srl_no_of_item==	198
replace 	grouplabel=	"vegetable - gourds"	 if 	 Srl_no_of_item==	200
replace 	grouplabel=	"vegetable - gourds"	 if 	 Srl_no_of_item==	201
replace 	grouplabel=	"vegetable - gourds"	 if 	 Srl_no_of_item==	202
replace 	grouplabel=	"vegetable - gourds"	 if 	 Srl_no_of_item==	203
replace 	grouplabel=	"vegetable - gourds"	 if 	 Srl_no_of_item==	204
replace 	grouplabel=	"vegetable - gourds"	 if 	 Srl_no_of_item==	205
replace 	grouplabel=	"vegetable - gourds"	 if 	 Srl_no_of_item==	206
replace 	grouplabel=	"leafy vegetables"	 if 	 Srl_no_of_item==	207
replace 	grouplabel=	"leafy vegetables"	 if 	 Srl_no_of_item==	208
replace 	grouplabel=	"leafy vegetables"	 if 	 Srl_no_of_item==	210
replace 	grouplabel=	"leafy vegetables"	 if 	 Srl_no_of_item==	211
replace 	grouplabel=	"leafy vegetables"	 if 	 Srl_no_of_item==	212
replace 	grouplabel=	"leafy vegetables"	 if 	 Srl_no_of_item==	213
replace 	grouplabel=	"leafy vegetables"	 if 	 Srl_no_of_item==	214
replace 	grouplabel=	"other vegetables"	 if 	 Srl_no_of_item==	215
replace 	grouplabel=	"other vegetables"	 if 	 Srl_no_of_item==	216
replace 	grouplabel=	"other vegetables"	 if 	 Srl_no_of_item==	217
replace 	grouplabel=	"other vegetables"	 if 	 Srl_no_of_item==	218
replace 	grouplabel=	"other vegetables"	 if 	 Srl_no_of_item==	220
replace 	grouplabel=	"other vegetables"	 if 	 Srl_no_of_item==	221
replace 	grouplabel=	"other vegetables"	 if 	 Srl_no_of_item==	222
replace 	grouplabel=	"other vegetables"	 if 	 Srl_no_of_item==	229
replace 	grouplabel=	"fresh fruits"	 if 	 Srl_no_of_item==	230
replace 	grouplabel=	"fresh fruits"	 if 	 Srl_no_of_item==	231
replace 	grouplabel=	"fresh fruits"	 if 	 Srl_no_of_item==	232
replace 	grouplabel=	"fresh fruits"	 if 	 Srl_no_of_item==	233
replace 	grouplabel=	"fresh fruits"	 if 	 Srl_no_of_item==	234
replace 	grouplabel=	"fresh fruits"	 if 	 Srl_no_of_item==	235
replace 	grouplabel=	"fresh fruits"	 if 	 Srl_no_of_item==	236
replace 	grouplabel=	"fresh fruits"	 if 	 Srl_no_of_item==	237
replace 	grouplabel=	"fresh fruits"	 if 	 Srl_no_of_item==	238
replace 	grouplabel=	"fresh fruits - others"	 if 	 Srl_no_of_item==	240
replace 	grouplabel=	"fresh fruits - others"	 if 	 Srl_no_of_item==	241
replace 	grouplabel=	"fresh fruits - others"	 if 	 Srl_no_of_item==	242
replace 	grouplabel=	"fresh fruits - others"	 if 	 Srl_no_of_item==	243
replace 	grouplabel=	"fresh fruits - others"	 if 	 Srl_no_of_item==	244
replace 	grouplabel=	"fresh fruits - others"	 if 	 Srl_no_of_item==	245
replace 	grouplabel=	"fresh fruits - others"	 if 	 Srl_no_of_item==	246
replace 	grouplabel=	"fresh fruits - others"	 if 	 Srl_no_of_item==	247
replace 	grouplabel=	"fresh fruits - others"	 if 	 Srl_no_of_item==	249
replace 	grouplabel=	"dry fruits and nuts"	 if 	 Srl_no_of_item==	250
replace 	grouplabel=	"dry fruits and nuts"	 if 	 Srl_no_of_item==	251
replace 	grouplabel=	"dry fruits and nuts"	 if 	 Srl_no_of_item==	252
replace 	grouplabel=	"dry fruits and nuts"	 if 	 Srl_no_of_item==	253
replace 	grouplabel=	"dry fruits and nuts"	 if 	 Srl_no_of_item==	254
replace 	grouplabel=	"dry fruits and nuts"	 if 	 Srl_no_of_item==	255
replace 	grouplabel=	"dry fruits and nuts"	 if 	 Srl_no_of_item==	256
replace 	grouplabel=	"dry fruits and nuts"	 if 	 Srl_no_of_item==	257
replace 	grouplabel=	"dry fruits and nuts"	 if 	 Srl_no_of_item==	259
replace 	grouplabel=	"sugar"	 if 	 Srl_no_of_item==	260
replace 	grouplabel=	"sugar"	 if 	 Srl_no_of_item==	261
replace 	grouplabel=	"sugar"	 if 	 Srl_no_of_item==	262
replace 	grouplabel=	"sugar"	 if 	 Srl_no_of_item==	263
replace 	grouplabel=	"sugar"	 if 	 Srl_no_of_item==	264
replace 	grouplabel=	"sugar"	 if 	 Srl_no_of_item==	269
replace 	grouplabel=	"salt"	 if 	 Srl_no_of_item==	279
replace 	grouplabel=	"spices"	 if 	 Srl_no_of_item==	280
replace 	grouplabel=	"spices"	 if 	 Srl_no_of_item==	281
replace 	grouplabel=	"spices"	 if 	 Srl_no_of_item==	282
replace 	grouplabel=	"spices"	 if 	 Srl_no_of_item==	283
replace 	grouplabel=	"spices"	 if 	 Srl_no_of_item==	284
replace 	grouplabel=	"spices"	 if 	 Srl_no_of_item==	285
replace 	grouplabel=	"spices"	 if 	 Srl_no_of_item==	286
replace 	grouplabel=	"spices"	 if 	 Srl_no_of_item==	287
replace 	grouplabel=	"spices"	 if 	 Srl_no_of_item==	288
replace 	grouplabel=	"spices"	 if 	 Srl_no_of_item==	289
replace 	grouplabel=	"beverages, refreshments and processed food - beverages"	 if 	 Srl_no_of_item==	290
replace 	grouplabel=	"beverages, refreshments and processed food - beverages"	 if 	 Srl_no_of_item==	291
replace 	grouplabel=	"beverages, refreshments and processed food - beverages"	 if 	 Srl_no_of_item==	292
replace 	grouplabel=	"beverages, refreshments and processed food - beverages"	 if 	 Srl_no_of_item==	293
replace 	grouplabel=	"beverages, refreshments and processed food - beverages"	 if 	 Srl_no_of_item==	294
replace 	grouplabel=	"beverages, refreshments and processed food - beverages"	 if 	 Srl_no_of_item==	295
replace 	grouplabel=	"beverages, refreshments and processed food - beverages"	 if 	 Srl_no_of_item==	296
replace 	grouplabel=	"beverages, refreshments and processed food - beverages"	 if 	 Srl_no_of_item==	297
replace 	grouplabel=	"beverages, refreshments and processed food - beverages"	 if 	 Srl_no_of_item==	298
replace 	grouplabel=	"beverages, refreshments and processed food - refreshments and processed food"	 if 	 Srl_no_of_item==	300
replace 	grouplabel=	"beverages, refreshments and processed food - refreshments and processed food"	 if 	 Srl_no_of_item==	301
replace 	grouplabel=	"beverages, refreshments and processed food - refreshments and processed food"	 if 	 Srl_no_of_item==	302
replace 	grouplabel=	"beverages, refreshments and processed food - refreshments and processed food"	 if 	 Srl_no_of_item==	303
replace 	grouplabel=	"beverages, refreshments and processed food - refreshments and processed food"	 if 	 Srl_no_of_item==	304
replace 	grouplabel=	"beverages, refreshments and processed food - refreshments and processed food"	 if 	 Srl_no_of_item==	305
replace 	grouplabel=	"beverages, refreshments and processed food - refreshments and processed food"	 if 	 Srl_no_of_item==	306
replace 	grouplabel=	"beverages, refreshments and processed food - refreshments and processed food"	 if 	 Srl_no_of_item==	307
replace 	grouplabel=	"beverages, refreshments and processed food - refreshments and processed food"	 if 	 Srl_no_of_item==	308
replace 	grouplabel=	"beverages, refreshments and processed food - refreshments and processed food"	 if 	 Srl_no_of_item==	309
replace 	grouplabel=	"pan"	 if 	 Srl_no_of_item==	310
replace 	grouplabel=	"pan"	 if 	 Srl_no_of_item==	311
replace 	grouplabel=	"pan"	 if 	 Srl_no_of_item==	312
replace 	grouplabel=	"pan"	 if 	 Srl_no_of_item==	313
replace 	grouplabel=	"pan"	 if 	 Srl_no_of_item==	314
replace 	grouplabel=	"pan"	 if 	 Srl_no_of_item==	315
replace 	grouplabel=	"pan"	 if 	 Srl_no_of_item==	319
replace 	grouplabel=	"tobacco"	 if 	 Srl_no_of_item==	320
replace 	grouplabel=	"tobacco"	 if 	 Srl_no_of_item==	321
replace 	grouplabel=	"tobacco"	 if 	 Srl_no_of_item==	322
replace 	grouplabel=	"tobacco"	 if 	 Srl_no_of_item==	323
replace 	grouplabel=	"tobacco"	 if 	 Srl_no_of_item==	324
replace 	grouplabel=	"tobacco"	 if 	 Srl_no_of_item==	325
replace 	grouplabel=	"tobacco"	 if 	 Srl_no_of_item==	326
replace 	grouplabel=	"tobacco"	 if 	 Srl_no_of_item==	327
replace 	grouplabel=	"tobacco"	 if 	 Srl_no_of_item==	329
replace 	grouplabel=	"intoxicants"	 if 	 Srl_no_of_item==	330
replace 	grouplabel=	"intoxicants"	 if 	 Srl_no_of_item==	331
replace 	grouplabel=	"intoxicants"	 if 	 Srl_no_of_item==	332
replace 	grouplabel=	"intoxicants"	 if 	 Srl_no_of_item==	333
replace 	grouplabel=	"intoxicants"	 if 	 Srl_no_of_item==	334
replace 	grouplabel=	"intoxicants"	 if 	 Srl_no_of_item==	335
replace 	grouplabel=	"intoxicants"	 if 	 Srl_no_of_item==	339
replace 	grouplabel=	"fuel and light"	 if 	 Srl_no_of_item==	340
replace 	grouplabel=	"fuel and light"	 if 	 Srl_no_of_item==	341
replace 	grouplabel=	"fuel and light"	 if 	 Srl_no_of_item==	342
replace 	grouplabel=	"fuel and light"	 if 	 Srl_no_of_item==	343
replace 	grouplabel=	"fuel and light"	 if 	 Srl_no_of_item==	344
replace 	grouplabel=	"fuel and light"	 if 	 Srl_no_of_item==	345
replace 	grouplabel=	"fuel and light"	 if 	 Srl_no_of_item==	346
replace 	grouplabel=	"fuel and light"	 if 	 Srl_no_of_item==	347
replace 	grouplabel=	"fuel and light - gas"	 if 	 Srl_no_of_item==	348
replace 	grouplabel=	"fuel and light - gas"	 if 	 Srl_no_of_item==	350
replace 	grouplabel=	"fuel and light - gas"	 if 	 Srl_no_of_item==	351
replace 	grouplabel=	"fuel and light - gas"	 if 	 Srl_no_of_item==	352
replace 	grouplabel=	"fuel and light - gas"	 if 	 Srl_no_of_item==	353
replace 	grouplabel=	"fuel and light - gas"	 if 	 Srl_no_of_item==	359
replace 	grouplabel=	"clothing - personal wear"	 if 	 Srl_no_of_item==	360
replace 	grouplabel=	"clothing - personal wear"	 if 	 Srl_no_of_item==	361
replace 	grouplabel=	"clothing - personal wear"	 if 	 Srl_no_of_item==	362
replace 	grouplabel=	"clothing - personal wear"	 if 	 Srl_no_of_item==	363
replace 	grouplabel=	"clothing - personal wear"	 if 	 Srl_no_of_item==	364
replace 	grouplabel=	"clothing - personal wear"	 if 	 Srl_no_of_item==	365
replace 	grouplabel=	"clothing - personal wear"	 if 	 Srl_no_of_item==	366
replace 	grouplabel=	"clothing - personal wear"	 if 	 Srl_no_of_item==	367
replace 	grouplabel=	"clothing - linens"	 if 	 Srl_no_of_item==	368
replace 	grouplabel=	"clothing - linens"	 if 	 Srl_no_of_item==	370
replace 	grouplabel=	"clothing - linens"	 if 	 Srl_no_of_item==	371
replace 	grouplabel=	"clothing - linens"	 if 	 Srl_no_of_item==	379
replace 	grouplabel=	"clothing - linens"	 if 	 Srl_no_of_item==	380
replace 	grouplabel=	"clothing - linens"	 if 	 Srl_no_of_item==	381
replace 	grouplabel=	"clothing - linens"	 if 	 Srl_no_of_item==	382
replace 	grouplabel=	"clothing - linens"	 if 	 Srl_no_of_item==	383
replace 	grouplabel=	"clothing - linens"	 if 	 Srl_no_of_item==	384
replace 	grouplabel=	"clothing - other"	 if 	 Srl_no_of_item==	385
replace 	grouplabel=	"clothing - other"	 if 	 Srl_no_of_item==	386
replace 	grouplabel=	"clothing - linens"	 if 	 Srl_no_of_item==	387
replace 	grouplabel=	"clothing - linens"	 if 	 Srl_no_of_item==	389
replace 	grouplabel=	"clothing - other"	 if 	 Srl_no_of_item==	372
replace 	grouplabel=	"clothing - other"	 if 	 Srl_no_of_item==	373
replace 	grouplabel=	"clothing - personal wear"	 if 	 Srl_no_of_item==	374
replace 	grouplabel=	"footwear"	 if 	 Srl_no_of_item==	390
replace 	grouplabel=	"footwear"	 if 	 Srl_no_of_item==	391
replace 	grouplabel=	"footwear"	 if 	 Srl_no_of_item==	392
replace 	grouplabel=	"footwear"	 if 	 Srl_no_of_item==	393
replace 	grouplabel=	"footwear"	 if 	 Srl_no_of_item==	394
replace 	grouplabel=	"footwear"	 if 	 Srl_no_of_item==	399
replace 	grouplabel=	"amusement"	 if 	 Srl_no_of_item==	430
replace 	grouplabel=	"amusement"	 if 	 Srl_no_of_item==	431
replace 	grouplabel=	"amusement"	 if 	 Srl_no_of_item==	432
replace 	grouplabel=	"amusement"	 if 	 Srl_no_of_item==	433
replace 	grouplabel=	"amusement"	 if 	 Srl_no_of_item==	434
replace 	grouplabel=	"amusement"	 if 	 Srl_no_of_item==	435
replace 	grouplabel=	"amusement"	 if 	 Srl_no_of_item==	436
replace 	grouplabel=	"amusement"	 if 	 Srl_no_of_item==	437
replace 	grouplabel=	"amusement"	 if 	 Srl_no_of_item==	439
replace 	grouplabel=	"education"	 if 	 Srl_no_of_item==	400
replace 	grouplabel=	"education"	 if 	 Srl_no_of_item==	401
replace 	grouplabel=	"education"	 if 	 Srl_no_of_item==	402
replace 	grouplabel=	"education"	 if 	 Srl_no_of_item==	403
replace 	grouplabel=	"education"	 if 	 Srl_no_of_item==	404
replace 	grouplabel=	"education"	 if 	 Srl_no_of_item==	405
replace 	grouplabel=	"education"	 if 	 Srl_no_of_item==	406
replace 	grouplabel=	"education"	 if 	 Srl_no_of_item==	409
replace 	grouplabel=	"medical - institutional"	 if 	 Srl_no_of_item==	410
replace 	grouplabel=	"medical - institutional"	 if 	 Srl_no_of_item==	411
replace 	grouplabel=	"medical - institutional"	 if 	 Srl_no_of_item==	412
replace 	grouplabel=	"medical - institutional"	 if 	 Srl_no_of_item==	413
replace 	grouplabel=	"medical - institutional"	 if 	 Srl_no_of_item==	414
replace 	grouplabel=	"medical - institutional"	 if 	 Srl_no_of_item==	419
replace 	grouplabel=	"medical - non institutional"	 if 	 Srl_no_of_item==	420
replace 	grouplabel=	"medical - non institutional"	 if 	 Srl_no_of_item==	421
replace 	grouplabel=	"medical - non institutional"	 if 	 Srl_no_of_item==	422
replace 	grouplabel=	"medical - non institutional"	 if 	 Srl_no_of_item==	423
replace 	grouplabel=	"medical - non institutional"	 if 	 Srl_no_of_item==	424
replace 	grouplabel=	"medical - non institutional"	 if 	 Srl_no_of_item==	429
replace 	grouplabel=	"personal care and effect"	 if 	 Srl_no_of_item==	440
replace 	grouplabel=	"personal care and effect"	 if 	 Srl_no_of_item==	441
replace 	grouplabel=	"personal care and effect"	 if 	 Srl_no_of_item==	442
replace 	grouplabel=	"personal care and effect"	 if 	 Srl_no_of_item==	443
replace 	grouplabel=	"personal care and effect"	 if 	 Srl_no_of_item==	444
replace 	grouplabel=	"personal care and effect"	 if 	 Srl_no_of_item==	445
replace 	grouplabel=	"personal care and effect"	 if 	 Srl_no_of_item==	446
replace 	grouplabel=	"personal care and effect"	 if 	 Srl_no_of_item==	449
replace 	grouplabel=	"toilet articles"	 if 	 Srl_no_of_item==	450
replace 	grouplabel=	"toilet articles"	 if 	 Srl_no_of_item==	451
replace 	grouplabel=	"toilet articles"	 if 	 Srl_no_of_item==	452
replace 	grouplabel=	"toilet articles"	 if 	 Srl_no_of_item==	453
replace 	grouplabel=	"toilet articles"	 if 	 Srl_no_of_item==	454
replace 	grouplabel=	"toilet articles"	 if 	 Srl_no_of_item==	455
replace 	grouplabel=	"toilet articles"	 if 	 Srl_no_of_item==	456
replace 	grouplabel=	"toilet articles"	 if 	 Srl_no_of_item==	457
replace 	grouplabel=	"toilet articles"	 if 	 Srl_no_of_item==	459
replace 	grouplabel=	"toilet articles"	 if 	 Srl_no_of_item==	458
replace 	grouplabel=	"sundry articles"	 if 	 Srl_no_of_item==	460
replace 	grouplabel=	"sundry articles"	 if 	 Srl_no_of_item==	461
replace 	grouplabel=	"sundry articles"	 if 	 Srl_no_of_item==	462
replace 	grouplabel=	"sundry articles"	 if 	 Srl_no_of_item==	463
replace 	grouplabel=	"sundry articles"	 if 	 Srl_no_of_item==	464
replace 	grouplabel=	"sundry articles"	 if 	 Srl_no_of_item==	465
replace 	grouplabel=	"sundry articles"	 if 	 Srl_no_of_item==	466
replace 	grouplabel=	"sundry articles  - detergents"	 if 	 Srl_no_of_item==	467
replace 	grouplabel=	"sundry articles  - detergents"	 if 	 Srl_no_of_item==	468
replace 	grouplabel=	"sundry articles  - detergents"	 if 	 Srl_no_of_item==	470
replace 	grouplabel=	"sundry articles  - detergents"	 if 	 Srl_no_of_item==	471
replace 	grouplabel=	"sundry articles  - detergents"	 if 	 Srl_no_of_item==	472
replace 	grouplabel=	"sundry articles  - detergents"	 if 	 Srl_no_of_item==	473
replace 	grouplabel=	"sundry articles  - detergents"	 if 	 Srl_no_of_item==	479
replace 	grouplabel=	"consumer services"	 if 	 Srl_no_of_item==	480
replace 	grouplabel=	"consumer services"	 if 	 Srl_no_of_item==	481
replace 	grouplabel=	"consumer services"	 if 	 Srl_no_of_item==	482
replace 	grouplabel=	"consumer services"	 if 	 Srl_no_of_item==	483
replace 	grouplabel=	"Consumer services - others"	 if 	 Srl_no_of_item==	484
replace 	grouplabel=	"Consumer services - others"	 if 	 Srl_no_of_item==	485
replace 	grouplabel=	"Consumer services - others"	 if 	 Srl_no_of_item==	486
replace 	grouplabel=	"Consumer services - others"	 if 	 Srl_no_of_item==	487
replace 	grouplabel=	"Consumer services - others"	 if 	 Srl_no_of_item==	488
replace 	grouplabel=	"Consumer services - others"	 if 	 Srl_no_of_item==	490
replace 	grouplabel=	"Consumer services - others"	 if 	 Srl_no_of_item==	491
replace 	grouplabel=	"Consumer services - others"	 if 	 Srl_no_of_item==	492
replace 	grouplabel=	"Consumer services - others"	 if 	 Srl_no_of_item==	494
replace 	grouplabel=	"Consumer services - others"	 if 	 Srl_no_of_item==	499
replace 	grouplabel=	"conveyance"	 if 	 Srl_no_of_item==	501
replace 	grouplabel=	"conveyance"	 if 	 Srl_no_of_item==	502
replace 	grouplabel=	"conveyance"	 if 	 Srl_no_of_item==	503
replace 	grouplabel=	"conveyance"	 if 	 Srl_no_of_item==	500
replace 	grouplabel=	"conveyance"	 if 	 Srl_no_of_item==	507
replace 	grouplabel=	"conveyance"	 if 	 Srl_no_of_item==	504
replace 	grouplabel=	"conveyance"	 if 	 Srl_no_of_item==	505
replace 	grouplabel=	"conveyance fuels"	 if 	 Srl_no_of_item==	506
replace 	grouplabel=	"conveyance fuels"	 if 	 Srl_no_of_item==	508
replace 	grouplabel=	"conveyance fuels"	 if 	 Srl_no_of_item==	510
replace 	grouplabel=	"conveyance fuels"	 if 	 Srl_no_of_item==	511
replace 	grouplabel=	"conveyance fuels"	 if 	 Srl_no_of_item==	512
replace 	grouplabel=	"conveyance fuels"	 if 	 Srl_no_of_item==	513
replace 	grouplabel=	"conveyance fuels"	 if 	 Srl_no_of_item==	519
replace 	grouplabel=	"Pet animals and others"	 if 	 Srl_no_of_item==	493
replace 	grouplabel=	"rents"	 if 	 Srl_no_of_item==	520
replace 	grouplabel=	"rents"	 if 	 Srl_no_of_item==	521
replace 	grouplabel=	"rents"	 if 	 Srl_no_of_item==	522
replace 	grouplabel=	"rents"	 if 	 Srl_no_of_item==	529
replace 	grouplabel=	"rents"	 if 	 Srl_no_of_item==	539
replace 	grouplabel=	"consumer taxes ad cesses"	 if 	 Srl_no_of_item==	540
replace 	grouplabel=	"consumer taxes ad cesses"	 if 	 Srl_no_of_item==	541
replace 	grouplabel=	"consumer taxes ad cesses"	 if 	 Srl_no_of_item==	549
replace 	grouplabel=	"furniture and fixture - furniture"	 if 	 Srl_no_of_item==	550
replace 	grouplabel=	"furniture and fixture - furniture"	 if 	 Srl_no_of_item==	551
replace 	grouplabel=	"furniture and fixture - furniture"	 if 	 Srl_no_of_item==	552
replace 	grouplabel=	"furniture and fixture -fixture"	 if 	 Srl_no_of_item==	553
replace 	grouplabel=	"furniture and fixture -fixture"	 if 	 Srl_no_of_item==	554
replace 	grouplabel=	"furniture and fixture -fixture"	 if 	 Srl_no_of_item==	555
replace 	grouplabel=	"furniture and fixture -fixture"	 if 	 Srl_no_of_item==	556
replace 	grouplabel=	"furniture and fixture -fixture"	 if 	 Srl_no_of_item==	557
replace 	grouplabel=	"furniture and fixture -fixture"	 if 	 Srl_no_of_item==	559
replace 	grouplabel=	"recreation, entertainment and hobbies"	 if 	 Srl_no_of_item==	560
replace 	grouplabel=	"recreation, entertainment and hobbies"	 if 	 Srl_no_of_item==	561
replace 	grouplabel=	"recreation, entertainment and hobbies"	 if 	 Srl_no_of_item==	562
replace 	grouplabel=	"recreation, entertainment and hobbies"	 if 	 Srl_no_of_item==	563
replace 	grouplabel=	"recreation, entertainment and hobbies"	 if 	 Srl_no_of_item==	564
replace 	grouplabel=	"recreation, entertainment and hobbies"	 if 	 Srl_no_of_item==	565
replace 	grouplabel=	"recreation, entertainment and hobbies"	 if 	 Srl_no_of_item==	566
replace 	grouplabel=	"Goods for recreation, entertainment, and hobbies - others"	 if 	 Srl_no_of_item==	567
replace 	grouplabel=	"Goods for recreation, entertainment, and hobbies - others"	 if 	 Srl_no_of_item==	568
replace 	grouplabel=	"Goods for recreation, entertainment, and hobbies - others"	 if 	 Srl_no_of_item==	569
replace 	grouplabel=	"jewellery and ornaments"	 if 	 Srl_no_of_item==	570
replace 	grouplabel=	"jewellery and ornaments"	 if 	 Srl_no_of_item==	571
replace 	grouplabel=	"jewellery and ornaments"	 if 	 Srl_no_of_item==	572
replace 	grouplabel=	"jewellery and ornaments"	 if 	 Srl_no_of_item==	573
replace 	grouplabel=	"jewellery and ornaments"	 if 	 Srl_no_of_item==	579
replace 	grouplabel=	"Household utensils"	 if 	 Srl_no_of_item==	580
replace 	grouplabel=	"Household utensils"	 if 	 Srl_no_of_item==	581
replace 	grouplabel=	"Household utensils"	 if 	 Srl_no_of_item==	582
replace 	grouplabel=	"Household utensils"	 if 	 Srl_no_of_item==	583
replace 	grouplabel=	"Household utensils"	 if 	 Srl_no_of_item==	589
replace 	grouplabel=	"cooking and household appliances"	 if 	 Srl_no_of_item==	590
replace 	grouplabel=	"cooking and household appliances"	 if 	 Srl_no_of_item==	595
replace 	grouplabel=	"cooking and household appliances"	 if 	 Srl_no_of_item==	596
replace 	grouplabel=	"cooking and household appliances"	 if 	 Srl_no_of_item==	593
replace 	grouplabel=	"cooking and household appliances"	 if 	 Srl_no_of_item==	594
replace 	grouplabel=	"cooking and household appliances"	 if 	 Srl_no_of_item==	597
replace 	grouplabel=	"cooking and household appliances"	 if 	 Srl_no_of_item==	591
replace 	grouplabel=	"cooking and household appliances"	 if 	 Srl_no_of_item==	592
replace 	grouplabel=	"cooking and household appliances - others"	 if 	 Srl_no_of_item==	598
replace 	grouplabel=	"cooking and household appliances - others"	 if 	 Srl_no_of_item==	600
replace 	grouplabel=	"cooking and household appliances - others"	 if 	 Srl_no_of_item==	609
replace 	grouplabel=	"personal transport equipment"	 if 	 Srl_no_of_item==	610
replace 	grouplabel=	"personal transport equipment"	 if 	 Srl_no_of_item==	611
replace 	grouplabel=	"personal transport equipment"	 if 	 Srl_no_of_item==	612
replace 	grouplabel=	"personal transport equipment"	 if 	 Srl_no_of_item==	613
replace 	grouplabel=	"personal transport equipment"	 if 	 Srl_no_of_item==	614
replace 	grouplabel=	"personal transport equipment"	 if 	 Srl_no_of_item==	619
replace 	grouplabel=	"therapeutic appliances and equipments"	 if 	 Srl_no_of_item==	620
replace 	grouplabel=	"therapeutic appliances and equipments"	 if 	 Srl_no_of_item==	621
replace 	grouplabel=	"therapeutic appliances and equipments"	 if 	 Srl_no_of_item==	629
replace 	grouplabel=	"other personal goods"	 if 	 Srl_no_of_item==	630
replace 	grouplabel=	"other personal goods"	 if 	 Srl_no_of_item==	631
replace 	grouplabel=	"other personal goods"	 if 	 Srl_no_of_item==	632
replace 	grouplabel=	"other personal goods"	 if 	 Srl_no_of_item==	639
replace 	grouplabel=	"residential building, land & other durables"	 if 	 Srl_no_of_item==	640
replace 	grouplabel=	"residential building, land & other durables"	 if 	 Srl_no_of_item==	641
replace 	grouplabel=	"residential building, land & other durables"	 if 	 Srl_no_of_item==	642
replace 	grouplabel=	"residential building, land & other durables"	 if 	 Srl_no_of_item==	643
replace 	grouplabel=	"residential building, land & other durables"	 if 	 Srl_no_of_item==	649
replace 	grouplabel=	"residential building, land & other durables"	 if 	 Srl_no_of_item==	659


order state55 statelabel55 regionlabel55 ,before(region55)
order itemlabel55 grouplabel55, after( Srl_no_of_item)

********
*cleanup
********

*156 obs with erroneous itemcode55 (not in survey list):
drop if itemlabel55==" "

*Drop subtotals (except 139, which is a single item group, as well as salt.
gen x=mod(Srl_no_of_item,10)
drop if x==9 & Srl_no_of_item!=139 & Srl_no_of_item!=279  & Srl_no_of_item!=539
drop x

*Merge in mpce hhsize, wt, caste, religion, from hh_main
merge m:1 hhid using "$intermediate/hh_main_55_skinny.dta"
drop _merge

*Merge in number of kids, education of the head of households
merge m:1 hhid using "$intermediate/ind_55_skinny.dta"
drop _merge

*Merge in multiplier 
merge m:1 hhid using "$input/multiplier.dta"
drop _merge

*Create a flag for mpce and sum of exp per capita being very different:
egen sum_exp=total(expenditure), by(hhid)
gen sum_exp_pc=sum_exp/Household_size
gen diff=abs(sum_exp_pc-Per_capitaexpenditure)
gen flag_mpce=0
*Usee the mean of per capita expenditure to define the cutoff for flag. same as in R43:
replace flag_mpce=1 if diff>=833
label var flag_mpce "mpce more than 833Rs different than sum of exp pc"
drop sum_exp sum_exp_pc diff

*add in district55 variable:
rename sector sector_str
merge m:1 hhid using  "$input/District55.dta"
drop _merge

$save "$intermediate/consumption_items_55.dta", replace

